﻿using System;
using System.Windows.Forms;

namespace InstitutionAssitant
{
    public partial class frmSupplierCodeCheck : DevComponents.DotNetBar.OfficeForm
    {
        public frmSupplierCodeCheck()
        {
            InitializeComponent();
        }
        #region  1.自定义方法
        /// <summary>
        /// 初始化
        /// </summary>
        private void _init() {
            // 控件赋初始值
            txtCode0.Text = ModelSupplierCodeCheck.strCode0;
            txtName0.Text = ModelSupplierCodeCheck.strName0;
            txtLinkman0.Text = ModelSupplierCodeCheck.strLinkman0;

            txtCode1.Text = ModelSupplierCodeCheck.strCode1;
            txtName1.Text = ModelSupplierCodeCheck.strName1;
            txtLinkman1.Text = ModelSupplierCodeCheck.strLinkman1;
        }
        private void _save() {
            ModelSupplierCodeCheck._saveInfo();
            CommFun._messageBoxShow("配送企业对码成功！", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);            
            DialogResult = DialogResult.OK;
        }
        #endregion

        #region 2.系统事件方法
        private void frmEnterpriseCodeCheck_Load(object sender, EventArgs e)
        {
            _init();
        }

        private void btSave_Click(object sender, EventArgs e)
        {
            _save();
        }

        private void btnReturn_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        #endregion
    }
}
